import java.util.Arrays;

public class Text {
    public boolean isSubsequence (String S, String T) {
        // write code here
        char[] str = S.toCharArray();
        char[] str1 = T.toCharArray();
        int i = 0;
        int count = 0;
        while(i<S.length()) {
            for (int j = 0; j < T.length(); j++) {
                if (str[i] == str1[j]) {
                    count++;
                    break;
                }
            }
            i++;
        }
        if (count == i) {
            return true;
        }else {
            return false;
        }
    }
}
